package com.ybwh.springboot2.conf;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * <p>
 * 数据源druid的配置
 * </p>
 *
 * @author fanbeibei
 * @version V1.0
 * @since 2019/5/16 11:12
 */
//@Configuration
public class DataSourceDruidConfig {
    /**
     * 将所有前缀为druid下的配置项都加载到DataSource中
     */
//    @ConfigurationProperties(prefix = "druid")
//    @Bean
    public DataSource druidDataSource() {
        return new DruidDataSource();
    }
}
